package cn.edu.sdjzu.xg.bysj.domain;

import lombok.*;
import util.IdService;

import java.io.Serializable;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public final class StudentClass implements Comparable<StudentClass>, Serializable {
    private Integer id;
    private String description;
    private String no;
    private String remarks;
    private Department department;

    public String toString() {
        final String TAB = "    ";

        String retValue = "";

        retValue = "StudentClass ( "
                + super.toString() + TAB
                + "id = " + this.id + TAB
                + "description = " + this.description + TAB
                + " no = " + this.no + TAB
                + "remarks = " + this.remarks + TAB
                + "department = " + this.department + TAB

                + " )";
        return retValue;
    }

    @Override
    public int compareTo(StudentClass other) {
        // no为排序依据
        return this.no.compareTo(other.no);
    }
}
